<template>
    <div class="j-label">
        <span class="tle">{{ getLab(true) }}</span>
        <span class="sub c-title-4">{{ getLab(false) }}</span>
    </div>
</template>

<script setup lang="ts">
const prop = defineProps({
    label: {
        type: String,
        default: ""
    }
});
function getLab(bol: boolean) {
    let label = prop.label;
    const idx = label.lastIndexOf("USDT");
    if (bol) {
        label = label.slice(0, idx);
        return label;
    } else {
        if (idx > -1) {
            return String(" /").concat(label.slice(idx));
        }
    }
}
</script>

<style scoped lang="less">
.j-label {
    text-wrap: nowrap;
    .sub {
        color: var(--color);
    }
}
</style>
